﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ZoomControl.ascx.cs" Inherits="ZoomControl_ZoomControl" %>


        

<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" 
    AutoGenerateRows="False" DataSourceID="SqlDataSourceZoom" 
    EnableModelValidation="True" BorderStyle="None" GridLines="None">
    <Fields>
    
        <asp:TemplateField>

        <ItemTemplate>
        <div style="margin-left:-5px;">
            <a class="jqzoom"  title="Product" id="link" href='<%# ImageN(Eval("URL")) %>'>
            <img  src='<%# ImageN(Eval("URL")) %> ' 
                id="image" alt="just nothing"/>
        </a></div>
        </ItemTemplate>
        </asp:TemplateField>
    </Fields>
</asp:DetailsView>
<br />
<asp:DataList ID="dtImage" runat="server" DataKeyField="URL" 
            DataSourceID="SqlDataSourceZoom" 
            RepeatDirection="Horizontal" RepeatColumns="5" RepeatLayout="Flow">
                <ItemTemplate>
                    <asp:Image ID="btnChoseImg" runat="server" Height="47px" Width="40px" ImageUrl='<%# Eval("URL") %>' onprerender="btnChoseImg_PreRender" />
                     
                </ItemTemplate>
                <SelectedItemStyle BackColor="#FF9933" />
            </asp:DataList>

        <asp:SqlDataSource ID="SqlDataSourceZoom" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT * FROM [HinhAnh] WHERE ([MaSanPham] = @MaSanPham)">
            <SelectParameters>
                <asp:QueryStringParameter Name="MaSanPham" QueryStringField="id_product" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        




        

